92c61e7c4ec15e4e0ac94590542eb9c34e396542,tephra-hbase-compat-0.98/src/main/java/org/apache/tephra/hbase/coprocessor/TransactionProcessor.java,TransactionProcessor,preCompactScannerOpen,#ObserverContext#Store#List#ScanType#number#InternalScanner#CompactionRequest#,271
Before Change
List<? extends KeyValueScanner> scanners, ScanType scanType, long earliestPutTs, InternalScanner s,
CompactionRequest request)
throws IOException {
return createStoreScanner(c.getEnvironment(), "compaction", cache.getLatestState(), store, scanners,
scanType, earliestPutTs);
}
After Change
CompactionRequest request)
throws IOException {
// Get the latest tx snapshot state for the compaction
TransactionVisibilityState snapshot = cache.getLatestState();
// Record tx state before the compaction
if (compactionState != null) {
compactionState.record(request, snapshot);
}
// Also make sure to use the same snapshot for the compaction
return createStoreScanner(c.getEnvironment(), "compaction", snapshot, store, scanners, scanType, earliestPutTs);